package com.ttwl.www.app;

import android.app.Fragment;
import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.ttwl.www.app.zhuanlan.zhuanlanAdapter;

public class PhoneBookFragment extends Fragment {
    private View view;
    public PhoneBookFragment() {

    }

    public static PhoneBookFragment newInstance() {
        PhoneBookFragment fragment = new PhoneBookFragment();
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
    private RecyclerView mZlRv;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.fragment_zhuanlan, container, false);
        mZlRv = (RecyclerView) view.findViewById(R.id.zl_rv);


        GridLayoutManager layoutManager = new GridLayoutManager(view.getContext(), 1);
        mZlRv.setLayoutManager(layoutManager);

        mZlRv.setAdapter(new zhuanlanAdapter(view.getContext()));
        return view;
    }

}
